package com.itboye.jmsfhz.data.repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.itboye.core.interfaces.ICompleteListener;
import com.itboye.core.utils.BaseErrorListener;
import com.itboye.core.utils.BaseSuccessReqListener;
import com.itboye.core.utils.HttpUtils;
import com.itboye.core.utils.ByJsonRequest.Builder;
import com.itboye.jmsfhz.data.interfaces.IGetYanZhengMa;
import com.itboye.jmsfhz.data.model.PersonDataBean;
import com.itboye.jmsfhz.data.model.UserModel;

public class YanzhengmaRespository extends BaseNetRepository implements IGetYanZhengMa<String>{

	public static String getYZM="By_SecurityCode_send";
//	private HttpUtils<UserModel> utils = new HttpUtils<UserModel>();
	public YanzhengmaRespository(ICompleteListener listener){
		super(listener);
	}
	
	@Override
	public void getVerificationCode(String phoneNumber,String type) {
		String apiVer = "101";
    	Map<String,Object> params = new HashMap<String, Object>();
    	params.put("mobile", phoneNumber);
    	params.put("type", type);//1为注册，2为修改密码
		
		//目前最简化调用
		//START
		(new Builder<String>())
		.setTypeVerParamsAndReturnClass(getYZM, apiVer, params,String.class)
		.requestListener(new BaseSuccessReqListener<String>(getListener()))
		.errorListener(new BaseErrorListener(getListener()))
		.desEncodeThenBuildAndSend();
	}

	@Override
	public void add(String model) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void delete(String model) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void update(String model) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void getInfo(String model) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public List<String> query(String model) {
		// TODO Auto-generated method stub
		return null;
	}

}
